<ul class="pagination">
    <li class="paginate_button previous disabled">
        <a href="#" data-dt-idx="0" tabindex="0">共 {{ data.total_pages }} 页</a>
    </li>
    {% set rt = router_params %}
    {% set rt['for'] = router.getMatchedRoute().getName() %}
    {% for key,value in paginator(data.total_pages,data.current,4) %}
        {% set rt['page'] = value %}
        <li class="paginate_button{% if key == data.current %} active{% endif %}">
            <a data-target="#main" href="{{ url(rt) }}">{{ key }}</a>
        </li>
    {% endfor %}

</ul>